package com.winning.devops.batch.processor.ch01;

import com.winning.devops.batch.processor.ch01.domain.Customer;
import org.springframework.batch.item.ItemProcessor;
import org.springframework.stereotype.Component;

/**
 * 姓名大写Processor
 *
 * @author chensj
 * @date 2020-03-07 21:26
 */
@Component("firstNameItemProcessor")
public class FirstNameItemProcessor implements ItemProcessor<Customer, Customer> {
    @Override
    public Customer process(Customer item) throws Exception {
        // 姓 大写
        item.setFirstName(item.getFirstName().toUpperCase());
        return item;
    }
}
